Skip to content

feat(skills): add standardize-repo skill#13

Merged
evanharmon1 merged 3 commits into
mainfrom
feat/standardize-repo-skill
Jun 23, 2026
Merged

feat(skills): add standardize-repo skill#13
evanharmon1 merged 3 commits into
mainfrom
feat/standardize-repo-skill

Conversation

@evanharmon1

Copy link
Copy Markdown
Owner

Summary

A Claude Code skill that turns "apply my repo standards" into a repeatable, agent-runnable operation. It applies the harmon-init Copier template's conventions to repos, in three modes, and bundles the authoritative catalog of desired repo attributes (the part that doubles as living documentation of the standards).

Lives at ai/skills/repo/standardize-repo/ (alongside design/), symlinked into ~/.claude/skills/ for global discoverability, and cataloged in the README AI-assets table.

Modes (one skill, routed from SKILL.md)

  • new-repo — scaffold a brand-new repo from harmon-init
  • adopt-existing — retrofit the template into an existing repo (detect type → copier copy --vcs-ref=HEAD → reconcile drift on a branch)
  • audit — report and reconcile drift from the standards

Layout

ai/skills/repo/standardize-repo/
├── SKILL.md                         # router + cardinal copier rules
├── references/
│   ├── standards-catalog.md         # THE desired-repo-attributes catalog (Universal / by type / divergences; [copier] vs [manual])
│   ├── mode-new-repo.md  mode-adopt-existing.md  mode-audit.md
│   ├── copier-gotchas.md            # --vcs-ref=HEAD, delimiters, _preserve_symlinks, .meta/gitignore drop, etc.
│   └── post-generation-checklist.md # GitHub setup, each step tagged [scriptable via gh] / [human-only]
└── assets/
    ├── detect-project-type.sh       # infer copier --data from repo contents
    └── verify-applied.sh            # post-apply validation (task verify + AGENTS.md-canonical + leaked-marker + gitleaks)

How it was built

Authored and adversarially verified via an ultracode workflow (9 artifacts × draft + independent verifier, 18 agents) against the live source repos. The verifiers caught and fixed real issues (a --vcs-ref=HEAD contradiction in mode-new-repo.md; two catalog inaccuracies).

Verification

  • shellcheck --severity=error + shfmt clean on both scripts; macOS bash 3.2 portable.
  • SKILL.md frontmatter parses; all sibling references resolve.
  • detect-project-type.sh: harmon-infra → iac, sommerlawn-web → web-astro.
  • New-repo render: AGENTS.md canonical with working CLAUDE/GEMINI symlinks.
  • verify-applied.sh: exit 0 on a compliant fixture; nonzero on real failures and on a drifted repo (graceful WARN when task/gitleaks absent).

Notes

  • Commit ran all pre-commit hooks; only the broken-environment ansible-lint hook was skipped (ModuleNotFoundError in the local pre-commit cache — unrelated to this change, which has no ansible files).
  • verify-applied.sh surfaced a real harmon-init bug during testing: trim_blocks eats the newline after the trailing [% endif %] in template/LICENSE.jinja, so generated repos' LICENSE has no final newline and fails their own lint:hygiene. Tracked for a separate harmon-init fix.

🤖 Generated with Claude Code

A Claude Code skill that applies the harmon-init Copier template's
conventions to repos, in three modes:

- new-repo: scaffold a brand-new repo from harmon-init
- adopt-existing: retrofit the template into an existing repo
- audit: report and reconcile drift from the standards

It also bundles the authoritative repo-conventions catalog
(references/standards-catalog.md) — the desired attributes for any repo,
tagged [copier] (auto-applied) vs [manual] (agent follow-up).

Layout: SKILL.md (router + cardinal copier rules) + references/
(standards-catalog, the three mode guides, copier-gotchas,
post-generation-checklist) + assets/ (detect-project-type.sh,
verify-applied.sh, both shellcheck/shfmt-clean and macOS bash 3.2 portable).

Authored and adversarially verified via an ultracode workflow against the
live source repos (harmon-init, harmon-infra, sommerlawn-web). Symlinked
into ~/.claude/skills for global discoverability; cataloged in README.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
evanharmon1 and others added 2 commits June 22, 2026 21:52
Per the convention that .yml vs .yaml is left to each tool's own default
(don't normalize repo-wide), corrected the standardize-repo skill:

- standards-catalog.md: replaced "YAML uses .yml (not .yaml)" with "follow
  each tool's own convention"; reframed the divergences "file extensions"
  entry as by-design, not drift.
- mode-audit.md: drift class E is now "NOT drift; do not flag" instead of
  ".yaml -> .yml"; removed `git mv *.yaml *.yml` from the reconciliation list.
- mode-adopt-existing.md: replaced the "rename drifted YAML extensions" step
  with "leave YAML extensions alone".

Detection that accepts both extensions (verify-applied.sh, detect-project-type.sh)
is unchanged. Mirrors harmon-init PR #81.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… Coder

- post-generation-checklist.md: the devcontainer secret standard is 1Password
  Environments (mounts a virtual .env at .devcontainer/devcontainer.env over a
  UNIX pipe; never on disk/git) with the per-profile var list; corrected the
  init-env.sh description (it enforces the allow-list + seeds from host env on
  Coder — it does not call op); added a Coder step (org-level workspace template,
  repo + secret parameters → host env → init-env).
- standards-catalog.md: same 1Password Environments correction in the
  devcontainer section + a Coder entry; points at the generated repo's
  docs/guides/devcontainers.md for the full walkthrough.

Mirrors harmon-init PR #82.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@evanharmon1 evanharmon1 merged commit a35b837 into main Jun 23, 2026
4 of 8 checks passed
@evanharmon1 evanharmon1 deleted the feat/standardize-repo-skill branch June 23, 2026 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant